package com.jackstraw.create.param;

import lombok.Data;

/**
 * 版权所有： 稻草人
 * 所在包：com.jackstraw.create.param
 * 文件名：
 * 项目：create
 * 功能描述：
 * 修改时间：2021-04-16 18:00
 *
 * @author jackstraw
 */
@Data
public class RespResult {

    private String code;

    private Boolean result;

    private String msg;

    private Object data;

    public static RespResult success() {
        RespResult result = new RespResult();
        result.setResult(true);
        return result;
    }

    public static RespResult error() {
        RespResult result = new RespResult();
        result.setResult(false);
        return result;
    }

    public static RespResult error(String msg) {
        RespResult result = new RespResult();
        result.setMsg(msg);
        result.setResult(false);
        return result;
    }
}
